<html>
<head>
<title>elena_index</title>
<link rel="stylesheet" type="text/css"
	href="js/ext/resources/css/ext-all.css" />
<link rel="stylesheet" type="text/css" href="style/mystyle.css" />
<script type="text/javascript" src="js/ext/adapter/ext/ext-base.js"></script>
<script type="text/javascript" src="js/ext/ext-all.js"></script>
<!-- 		<script type="text/javascript" src="js/main.js"></script> -->

<script>
	// 	Ext.onReady(function() {
	// 		var root = new Ext.tree.AsyncTreeNode({
	// 			id : "root",
	// 			text : "1",
	// 			children : [{
	// 				text : "2",
	// 				children : [{
	// 					text : "3",
	// 					leaf : true
	// 				}, {
	// 					text : "4",
	// 					leaf : true
	// 				}]
	// 			}, {
	// 				text : "5",
	// 				children : [{
	// 					text : "6",
	// 					leaf : true
	// 				}, {
	// 					text : "7",
	// 					leaf : true
	// 				}, {
	// 					text : "8",
	// 					leaf : true
	// 				}, {
	// 					text : "9",
	// 					leaf : true
	// 				}, {
	// 					text : "10",
	// 					leaf : true
	// 				}, {
	// 					text : "11",
	// 					leaf : true
	// 				}]
	// 			}, {
	// 				text : "12",
	// 				children : [{
	// 					text : "13",
	// 					leaf : true
	// 				}, {
	// 					text : "14",
	// 					leaf : true
	// 				}]
	// 			}]
	// 		});
	// 		var tree = new Ext.tree.TreePanel({
	// 			root : root,//设置为根节点
	// 			renderTo : Ext.getBody(),
	// 			width : 200
	// 		});
	// 		tree.expandAll(); //展开所有节点
	// 		Ext.QuickTips.init();     //只显示根节点
	// 	});

	var Tree = Ext.tree;

	var tree = new Tree.TreePanel('tree', {
		animate : true,
		enableDD : false,
		loader : new Tree.TreeLoader(), // Note: no dataurl, register a TreeLoader to make use of createNode()
		lines : true,
		selModel : new Ext.tree.MultiSelectionModel(),
		containerScroll : false
	});

	// json data describing the tree
	var json = [{
		"text" : "Audi",
		"id" : 100,
		"leaf" : false,
		"cls" : "folder",
		"children" : [{
			"text" : "A3",
			"id" : 1000,
			"leaf" : false,
			"cls" : "folder",
			"children" : [{
				"text" : "Fuel Economy",
				"id" : "100000",
				"leaf" : true,
				"cls" : "file"
			}, {
				"text" : "Invoice",
				"id" : "100001",
				"leaf" : true,
				"cls" : "file"
			}, {
				"text" : "MSRP",
				"id" : "100002",
				"leaf" : true,
				"cls" : "file"
			}, {
				"text" : "Options",
				"id" : "100003",
				"leaf" : true,
				"cls" : "file"
			}, {
				"text" : "Specifications",
				"id" : "100004",
				"leaf" : true,
				"cls" : "file"
			}]
		}, {
			"text" : "TT",
			"id" : 1000,
			"leaf" : false,
			"cls" : "folder",
			"children" : [{
				"text" : "Fuel Economy",
				"id" : "100000",
				"leaf" : true,
				"cls" : "file"
			}, {
				"text" : "Invoice",
				"id" : "100001",
				"leaf" : true,
				"cls" : "file"
			}, {
				"text" : "MSRP",
				"id" : "100002",
				"leaf" : true,
				"cls" : "file"
			}, {
				"text" : "Options",
				"id" : "100003",
				"leaf" : true,
				"cls" : "file"
			}, {
				"text" : "Specifications",
				"id" : "100004",
				"leaf" : true,
				"cls" : "file"
			}]
		}]
	}, {
		"text" : "Cadillac",
		"id" : 300,
		"leaf" : false,
		"cls" : "folder",
		"children" : [{
			"text" : "CTS",
			"id" : 1000,
			"leaf" : false,
			"cls" : "folder",
			"children" : [{
				"text" : "Fuel Economy",
				"id" : "100000",
				"leaf" : true,
				"cls" : "file"
			}, {
				"text" : "Invoice",
				"id" : "100001",
				"leaf" : true,
				"cls" : "file"
			}, {
				"text" : "MSRP",
				"id" : "100002",
				"leaf" : true,
				"cls" : "file"
			}, {
				"text" : "Options",
				"id" : "100003",
				"leaf" : true,
				"cls" : "file"
			}, {
				"text" : "Specifications",
				"id" : "100004",
				"leaf" : true,
				"cls" : "file"
			}]
		}, {
			"text" : "CTS-V",
			"id" : 1000,
			"leaf" : false,
			"cls" : "folder",
			"children" : [{
				"text" : "Fuel Economy",
				"id" : "100000",
				"leaf" : true,
				"cls" : "file"
			}, {
				"text" : "Invoice",
				"id" : "100001",
				"leaf" : true,
				"cls" : "file"
			}, {
				"text" : "MSRP",
				"id" : "100002",
				"leaf" : true,
				"cls" : "file"
			}, {
				"text" : "Options",
				"id" : "100003",
				"leaf" : true,
				"cls" : "file"
			}, {
				"text" : "Specifications",
				"id" : "100004",
				"leaf" : true,
				"cls" : "file"
			}]
		}]
	}

	];

	// set the root node
	var root = new Tree.AsyncTreeNode({
		text : 'Autos',
		draggable : false,
		id : 'source',
		children : json
	});

	tree.setRootNode(root);

	tree.render();
	root.expand();
</script>
</script>
</head>
<body>
	<div id='top'></div>
</body>
</html>